package oldCodePackage;
import java.util.Random;


public class NPC extends Player{
	private int difficulty = 0;
	private final int PASS = -1;
	private static int numNPCs;
	private Random generator = new Random();

	NPC(){
		this.myName = "NPC " + numNPCs;
		numNPCs++;	
	}
	
	NPC(int difficulty){//TODO implement difficultly levels later
		this.setDifficulty(difficulty);
	}
	
	//auto passes
	@Override
	public int placeBid() {
		tricksBid = 0;
		return PASS;
	}

	@Override
	public Card playCard() {
		int randomIndex = 0;
		
		getPlayableCards();
		
		do{
			randomIndex = generator.nextInt(numCards);
		}while(!playableCard[randomIndex]);
		
		return myHand[randomIndex];
	}

	public void setDifficulty(int difficulty) {
		this.difficulty = difficulty;
	}

	public int getDifficulty() {
		return difficulty;
	}
	
}
